<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .chart1 {
        width: 800px;
        height: 400px;
      }

      .chart2 {
        width: 800px;
        height: 400px;
      }
    </style>
  </head>
  <body>
    <div class="chart1"></div>
    <div class="chart2"></div>
    <script src="https://cdn.bootcdn.net/ajax/libs/echarts/5.1.2/echarts.min.js"></script>
    <script>
      const chart1 = echarts.init(document.querySelector('.chart1'));
      const chart2 = echarts.init(document.querySelector('.chart2'), null, {renderer: 'svg'});

      const option1 = {
        title: {
          text: '折线图1',
        },
        xAxis: {
          data: ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日'],
        },
        yAxis: {
          min: 0,
          max: 100,
        },
        series: {
          type: 'line',
          data: [11, 20, 15, 22, 8, 24, 28],
        },
      };

      const option2 = {
        title: {
          text: '折线图2',
        },
        xAxis: {},
        yAxis: {
          data: ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日'],
        },
        series: {
          type: 'bar',
          data: [11, 20, 15, 22, 8, 24, 28],
        },
      };

      chart1.setOption(option1);
      chart2.setOption(option2);
    </script>
  </body>
</html>
